package com.cnoja.jmsncn.kernel;

import java.util.HashMap;
import java.util.Map;

public class ErrorCodes {
	private static final Map<String,String>  errors;
	static{
		errors=new HashMap<String, String>();
		errors.put("200", "Invalid syntax");
		errors.put("201", "Invalid parameter");
		errors.put("205", "Invalid principal");
		errors.put("206", "Domain name missing");
		errors.put("207", "Already logged in");
		errors.put("208", "Invalid principal-name");
		errors.put("210", "Principal list full");
		errors.put("215", "Principal already on list");
		errors.put("217", "Principal not on-line");
		errors.put("218", "Already in mode");
		errors.put("219", "Principal is in the opposite list");
		errors.put("223", "Too many groups");
		errors.put("224", "Invalid group");
		errors.put("225", "Principal not in group");
		errors.put("229", "Group name too long");
		errors.put("230", "Cannot remove group zero");
		errors.put("231", "Invalid group");
		errors.put("280", "Switchboard failed");
		errors.put("281", "Transfer to switchboard failed");
		errors.put("300", "Required field missing");
		errors.put("302", "Not logged in");
		errors.put("500", "Internal server error");
		errors.put("501", "Database server error");
		errors.put("502", "Command disabled");
		errors.put("510", "File operation failed");
		errors.put("520", "Memory allocation failed");
		errors.put("540", "Challenge response failed");
		errors.put("600", "Server is busy");
		errors.put("601", "Server is unavailable");
		errors.put("602", "Peer nameserver is down");
		errors.put("603", "Database connection failed");
		errors.put("604", "Server is going down");
		errors.put("605", "Server unavailable");
		errors.put("707", "Could not create connection");
		errors.put("710", "Bad CVR parameters sent");
		errors.put("711", "Write is blocking");
		errors.put("712", "Session is overloaded");
		errors.put("713", "Calling too rapidly");
		errors.put("714", "Too many sessions");
		errors.put("715", "Not expected");
		errors.put("717", "Bad friend file");
		errors.put("731", "Not expected");
		errors.put("800", "Changing too rapidly");
		errors.put("910", "Server too busy");
		errors.put("911", "Authentication failed");
		errors.put("912", "Server too busy");
		errors.put("913", "Not allowed when hiding");
		errors.put("914", "Server unavailable");
		errors.put("915", "Server unavailable");
		errors.put("916", "Server unavailable");
		errors.put("917", "Authentication failed");
		errors.put("918", "Server too busy");
		errors.put("919", "Server too busy");
		errors.put("920", "Not accepting new principals");
		errors.put("921", "Server too busy");
		errors.put("922", "Server too busy");
		errors.put("922", "Server too busy");
		errors.put("923", "Kids Passport without parental consent");
		errors.put("924", "Passport account not yet verified");
		errors.put("928", "Bad ticket");
	}

	
	public static String getErrorMessage(String code){
		return errors.get(code);
	}
}
